<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/jquery.min.js"/>
    <script type="text/javascript">
        function btn1() {
            $.ajax({
                url:"http://localhost:8081/pay",
                type:"GET",
                dataType:"json"
            }).then(res=>{
                console.log(res)
                const div=document.createElement('divform');
                div.innerHTML=res.formDate;
                document.body.appendChild(div);
                document.forms[0].submit();
            })
        }
    </script>
</head>
<body>
<button onclick="btn1()">支付</button>
</body>
</html>

